﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model.Dto.Login;
using Model.Dto.User;
using Model.Other;

namespace Interface
{/// <summary>
/// This is made by Wareey. You can find him by searching on Gitee.
/// </summary>
    public interface IUserService
    {
        //登录时获取用户信息
        Task<UserRes> GetUser(LoginReq req);
        /// <summary>
        /// 修改个人信息
        /// VGhpcyBpcyBtYWRlIGJ5IFdhcmVleSAuIFlvdSBjYW4gZmluZCBoaW0gYnkgc2VhcmNoaW5nIG9uIEdpdGVl
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="req"></param>
        /// <returns></returns>
        Task<bool> EditNickNameOrPassword(string userId, PersonEdit req);
        Task<bool> Add(UserAdd req, string userId);
        Task<bool> Edit(UserEdit req,string userId);
        Task<bool> Del(string id);
        Task<bool> BatchDel(string ids);
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="req"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<PageInfo<UserRes>> GetUsers(UserReq req ,string userId);
        //设置角色
        Task<bool> SettingRole(string uid, string rids);
    }
}
